fix(editor): render mention name from UUID, not markdown label#66
Merged
Conversation
Backend canonicalization (prior commit) rewrites mention labels on write, but rows that predate it — and any future write path that bypasses it — can still carry a label that disagrees with the UUID. Render the resolved entity's current name from the workspace cache so the displayed @mention always names who is actually addressed. EntityMentionName looks up agent / member / squad by UUID against the existing list queries (agentListOptions, memberListOptions, squadListOptions). Falls back to the markdown label only when the entity is not in cache (deleted, cross-workspace, or cold start). ReadonlyLink in readonly-content.tsx routes agent/member/squad mentions through it; the regex also gains `squad` (previously missing). @ALL and unknown shapes keep their literal label. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
furtherref
added a commit
that referenced
this pull request
May 19, 2026
Resolve conflicts in 7 files: - packages/views/editor/attachment-preview-modal.tsx: combine HEAD's fullscreen toggle with upstream's open-in-new-tab button. - packages/views/editor/readonly-content.tsx: keep HEAD's EntityMentionName import (fix #66); drop dead ImageLightbox import. - packages/views/onboarding/components/runtime-aside-panel.tsx: adopt upstream's i18n-aware install-agent-runtime docs URL. - packages/views/onboarding/steps/step-questionnaire.tsx: accept upstream deletion (replaced by per-question v2 steps). - packages/views/runtimes/components/connect-remote-dialog.tsx: take upstream's restructure; point INSTALL_CMD/TOKEN_CMD at furtherref/multica + multica.furtherref.com. - server/pkg/db/queries/issue.sql (ListOpenIssues): merge upstream's involves_user_id filter with HEAD's 'archive' status exclusion; regenerate issue.sql.go via sqlc. Follow-up: add archive entry to STATUS_BAR_BG in upstream's new gantt-view.tsx to satisfy Record<IssueStatus, string>. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Layer 2 of the squad-mention defense: render @mention labels from the resolved entity's current name (looked up by UUID against the workspace query cache) instead of trusting the label baked into the markdown.
Backend canonicalization (#65, already merged) rewrites mention labels on write, but historical rows that predate it — and any future write path that bypasses it — can still carry a stale or wrong label. With this layer, the displayed @mention always names who the UUID actually addresses, even when the markdown label is out of date.
Behaviour
EntityMentionNamecomponent (packages/views/editor/mention-name.tsx) resolves agent / member / squad mentions by UUID via the existing workspace list queries (agentListOptions,memberListOptions,squadListOptions).@alland unknown mention shapes keep their literal label.readonly-content.tsxgainssquad(previously missing — squad mentions weren't routed through any resolver before).Where this fits
Test plan
mention-name.test.tsx(new) — 11 tests covering agent / member / squad cache hit, cache miss fallback, unknown type fallback, label preservation, @ALL renderingreadonly-content.test.tsx(new) — 8 tests verifying the regex route and that the resolver is invoked for the right mention kindspnpm --filter @multica/views test— 656 / 656/codex:review --wait— 5 rounds clean🤖 Generated with Claude Code